package com.lin;

import java.util.ArrayList;
import java.util.List;

// 订单项类，包含水果和数量
class OrderItem {
    private Fruit fruit;
    private int quantity;

    public OrderItem(Fruit fruit, int quantity) {
        this.fruit = fruit;
        this.quantity = quantity;
    }

    public Fruit getFruit() {
        return fruit;
    }

    public int getQuantity() {
        return quantity;
    }

    public double getPrice() {
        return fruit.getPrice() * quantity;
    }
}

